Skip to content

Conversation

fatkodima
Copy link
Contributor

Closes #176.

It should be used by something like this:

Net::HTTP.default_configuration = {
  read_timeout: 1,
  write_timeout: 1
}

http = Net::HTTP.new(hostname)
http.open_timeout   # => 60
http.read_timeout   # => 1
http.write_timeout  # => 1

Probably, there is a better name for the new option. And maybe we should allow more options to be configured, let me know.

@hsbt hsbt merged commit bd8f570 into ruby:master Jul 11, 2024
@hsbt
Copy link
Member

hsbt commented Jul 11, 2024

Thanks!

@fatkodima fatkodima deleted the ability-to-set-defaults branch July 11, 2024 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

idea: global timeout settings
2 participants